The development and application of rule engines is one branch of Artificial Intelligence (A.I.), which is a research area that focuses on “making computers think like people.” Broadly speaking, a rule engine processes information by applying rules to data objects (also known as facts). Various types of rule engines have been developed to evaluate and process rules. One conventional type of rule engine is a Rete rule engine. A Rete rule engine implements a Rete network to process rules and data objects. An object is compared against each of the rules in a rule set to determine whether the object satisfies all of the constraints of any of the rules. An object that satisfies all of the constraints associated with a rule may be updated based on an action associated with that rule.
Data sets may be represented using relational or object graph reasoning. A conventional rule engine is used to build a system that provides a relational view over a data set. Data sets represented using relational reasoning include multiple objects that may be related to one or more other objects. Objects may thus have a one-to-one relationship to another object or a one-to-many relationship to other objects. In relational reasoning, no hierarchy exists between objects. Data structures used to represent objects in a relational model are referred to as being flat, as no one object is hierarchically higher or lower than another object.
For Object-Oriented (OO) systems, an object-oriented model is used that implements object graph reasoning. An exemplary OO system is JAVA®. In JAVA®, graph-like data structures are used to represent objects. A graph or graph-like data structure (also known as a hierarchical data structure) represents a data structure of a graph. A graph may represent a set of objects, where pairs of objects may be connected by links. The objects may be referred to as vertices, nodes, or points and the links may be referred to as edges or arcs. A graph-like data structure may be a data structure that may implement graph concepts in mathematics, for example. A graph or graph-like data structure may include a finite set of vertices (or nodes or points). One object may have a one-to-one relationship to another object or a one-to-many relationship to other objects. In an object-oriented model, a hierarchy may exist between objects. For example, an object may be nested within another object.
Objects that rely on graph-like data structures may not be input into traditional rule engines (which process objects represented by a relational model) unless the objects are flattened. After the objects are flattened and hierarchical relationships are replaced by non-hierarchical relationships, the rule engine may reason over the flattened objects. Flattening of objects that rely on graph-like data structures for use by rule engines may be a time and resource consuming process. Thus, developers that use objects that rely on graph-like data structures in rule engines may dedicate a great amount of time and/or resources in order to flatten the objects.